<!DOCTYPE html>
<html lang="en">
<?php
require("header-yonghu.php");
?>
<?php
$name=$_SESSION["账户"];
$sql = "select * from question where 用户='{$name}'";
//echo $sql;
$rs=mysqli_query($db_link,$sql);
if(!$rs)
{
    echo "无满足条件的记录！";
    exit;
}
//$rows=mysqli_fetch_assoc($rs);



//echo $rows["房间号"];
?>
<div class="panel-default">
    <div class="panel-heading">
        问题处理
    </div>
    <div class="panel-body">
        <table class="table table-hover text-center" style="width: 80%;">
            <!-- On rows -->
            <?php
            $Z=0;
            $NZ=0;
            echo"<th class='text-center'>ID</th>";
            echo"<th class='text-center'>酒店</th>";
            echo"<th class='text-center'>申诉问题</th>";
            echo"<th class='text-center'>商家回复</th>";


            while($rows=mysqli_fetch_assoc($rs)){
                ++$Z;
                if($rows["回复"]!=='未回复'){++$NZ; echo "<tr class='danger' >";}else{
                    echo "<tr class='success' >";
                }

                echo"<td >".$rows["ID"]."</td>";
                echo"<td >".$rows["商家"]."</td>";
                echo"<td >".$rows["问题"]."</td>";

                if($rows["回复"]=='未回复'){
                    echo"<td ><a>商家未回复</a>
  
</td>";}else{ echo"<td >已回复：".$rows["回复"]."</td>"; }

                echo"</tr>";
            }
//            $LV=($NZ/$Z)*100;
            ?>

        </table>
    </div>
</div>
</body>
</html>